package com.example.et.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.example.et.entity.Che;
import com.example.et.entity.Mechanism;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Update;
import org.springframework.stereotype.Service;

@Service
public interface CheMapper extends BaseMapper<Che> {
    @Insert("insert into info_che (id,name) values (#{id},#{che})")
    int InsertChe(@Param("id") int id, @Param("che") String che);

    @Update("UPDATE info_che set name = #{che} where id = #{id}")
    int UpdateChe(@Param("id") int id,@Param("che") String che);

    @Delete("Delete from info_che where name = #{che}")
    int DeleteChe(@Param("che") String che);
}
